package com.crazy.common.page;
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import org.springframework.util.StringUtils;
/**
 * 分页标签类——参数标签
 * @author Zhang Weiwei
 * @since 2013-10-1上午11:35:47
 */
public class ParamTag extends SimpleTagSupport {
	private String name;// 查询条件参数名称
	private String value;// 查询条件参数值
	@Override
	public void doTag() throws JspException, IOException {
		if (StringUtils.hasText(this.name)) {
			PagerTag pagerTag = (PagerTag) this.getParent();
			String[] params = {this.name, this.value};
			pagerTag.addParams(params);
		}
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setValue(String value) {
		this.value = value;
	}
}
